package model;

import java.sql.*;

public interface IModel {
	IModel readFromResultSet(ResultSet rs) throws SQLException;

	PreparedStatement genSelectStatement(Connection dbConn, IModel query)
			throws SQLException;

	PreparedStatement genSelectListStatement(Connection dbConn, IModelExt input)
			throws SQLException;

	PreparedStatement genUpdateStatement(Connection dbConn, IModel model)
			throws SQLException;

	PreparedStatement genDeleteStatement(Connection dbConn, IModel query)
			throws SQLException;

	PreparedStatement genCountStatement(Connection dbConn, IModelExt input)
			throws SQLException;

	PreparedStatement genInsertStatement(Connection dbConn, IModel model)
			throws SQLException;

	int[] getPrimaryKey();

	int getId();

	void setId(int id);

	String getName();

	void setCreator(int creator);

	void setUpdator(int updator);
	
	java.util.Date getUpdated();	

}